#include<bits/stdc++.h>
using namespace std;
typedef double db;
const int MAXN=110;
int n,c[MAXN*8];
db ans,cnt[MAXN*8],lf[MAXN*8],rf[MAXN*8],b[MAXN*2];
struct node
{
	db x,y1,y2;
	int s;
}a[MAXN*2];
bool cmp(node a,node b)
{
	return a.x<b.x;
}
void maintain(int o,int l,int r)
{
	if(c[o])
	{
		cnt[o]=rf[o]-lf[o];
		return;
	}
	int lc=o<<1,rc=o<<1|1;
	if(l+1==r)cnt[o]=0;
	else cnt[o]=cnt[lc]+cnt[rc];
}
void build(int o,int l,int r)
{
	lf[o]=b[l];
	rf[o]=b[r];
	if(l+1==r)return;
	int lc=o<<1,rc=o<<1|1,mid=(l+r)>>1;
	build(lc,l,mid);
	build(rc,mid,r);
	return;
}
void update(int o,int l,int r,node v)
{
	if(v.y1==lf[o]&&v.y2==rf[o])
	{
		c[o]+=v.s;
		maintain(o,l,r);
		return;
	}
	int lc=o<<1,rc=o<<1|1,mid=(l+r)>>1;
	if(v.y2<=rf[lc])update(lc,l,mid,v);
	else if(v.y1>=lf[rc])update(rc,mid,r,v);
	else
	{
		node tmp=v;
		tmp.y2=rf[lc];
		update(lc,l,mid,tmp);
		tmp=v;
		tmp.y1=lf[rc];
		update(rc,mid,r,tmp);
	}
	maintain(o,l,r);
	return;
}
int main()
{
	int T=0;
	while(++T)
	{
		scanf("%d",&n);
		if(!n)break;
		int tot=0;
		ans=0;
		memset(a,0,sizeof(a));
		memset(lf,0,sizeof(lf));
		memset(rf,0,sizeof(rf));
		memset(cnt,0,sizeof(cnt));
		memset(b,0,sizeof(b));
		for(int i=1;i<=n;++i)
		{
			db x1,y1,x2,y2;
			scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
			a[i*2-1]=(node){x1,y1,y2,1};
			a[i*2]=(node){x2,y1,y2,-1};
			b[++tot]=y1;
			b[++tot]=y2;
		}
		sort(a+1,a+1+tot,cmp);
		sort(b+1,b+1+tot);
		build(1,1,tot);
		update(1,1,tot,a[1]);
		for(int i=2;i<=tot;++i)
		{
			ans+=cnt[1]*(a[i].x-a[i-1].x);
			update(1,1,tot,a[i]);
		}
		printf("Test case #%d\nTotal explored area: %.2f\n\n",T,ans);
	}
	return 0;
}
